#!/usr/bin/env python
# -*- coding: utf-8 -*-

import time
import win32com.client

strComputer = "."
objWMIService = win32com.client.Dispatch("WbemScripting.SWbemLocator")
objSWbemServices = objWMIService.ConnectServer(strComputer, "root\cimv2")

while 1:
    _disktime = 0
    _idletime = 0
    colItems = objSWbemServices.ExecQuery("Select * from Win32_PerfFormattedData_PerfDisk_PhysicalDisk")
    for objItem in colItems:
        _disktime = _disktime + int(objItem.PercentDiskTime)
        _idletime = _idletime + int(objItem.PercentIdleTime)
        print '...'
    
    print "Load Percentage: ", _disktime, 100 / (_idletime+1)
    time.sleep(0.1)